﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commerce.Base.Ubl.DataType
{
    /// <summary>
    /// The instance of time that occurs every day.
    /// </summary>
    public class Time : DateTime
    {
        public Time(System.DateTime value)
            : base(value)
        { }
        
        public override string ToString()
        {
            return this.Value.ToString("T");
        }

        public static implicit operator Time(System.DateTime value)
        {
            return new Time(value);
        }

        public static implicit operator System.DateTime(Time time)
        {
            return time.Value;
        }
    }
}
